<template>
  <c-select
    v-bind="$attrs"
    v-on="$listeners"
    filterable
    :value="value"
    :options="cateList"
    @change="handleItemChange"
  ></c-select>
</template>

<script>
import { enumJob } from '@/bank/plugins/enumJob'

export default {
  components: {},
  props: {
    value: {
      type: String,
      default: '',
    },
  },
  data() {
    return {
      selected: null,
      cateList: [],
    }
  },
  computed: {},
  watch: {},
  created() {},
  mounted() {
    this.getData()
  },
  methods: {
    getData() {
      this.cateList = enumJob
    },
    handleItemChange(val) {
      this.$emit('input', val)
      this.$emit('change', val, enumJob[val])
    },
    getJobName() {
      return this.value ? enumJob[this.value] : ''
    },
  },
}
</script>

<style lang="scss" scoped></style>
